import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

// 仅在开发环境并且需要使用mock时才引入mock配置
// import './mock'
// 改为条件导入
if (import.meta.env.DEV && import.meta.env.VITE_USE_MOCK === 'true') {
  import('./mock')
}

const app = createApp(App)

app.use(createPinia())
app.use(router)

app.mount('#app')
